/*******************************************************************************
 Chatty - Mobile Messaging - J2ME ICQ clone
 Copyright (C) 2003-05  Chatty Project

 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 as published by the Free Software Foundation; either version 2
 of the License, or (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 ********************************************************************************
 File: src/DrawControls/ListItem.java
 Version: ###VERSION###  Date: ###DATE###
 Author(s): Artyomov Denis, Vladimir Kryukov
 *******************************************************************************/


package DrawControls.text;

import DrawControls.icons.Icon;
import javax.microedition.lcdui.*;
import chatty.ui.base.CanvasEx;

//! Data for list item
/*! All members of class are made as public 
    in order to easy access. 
 */
final class Glyphs {
    public byte type;
	public short textIndex;
	public short imageIndex;
    public short from;
    public short to;
	public byte fontStyle;
	public byte colorType;

	Glyphs(short textIndex, int from, int to, byte colorType, byte fontStyle) {
        type = 0;
		this.textIndex = textIndex;
        this.imageIndex = -1;
        this.from = (short)from;
        this.to = (short)to;
		this.colorType = colorType;
		this.fontStyle = fontStyle;
	}

	public Glyphs(short imageIndex, short text) {
		this.imageIndex = imageIndex;
		this.textIndex = text;
        type = 2;
	}
	public Glyphs(byte type) {
        this.type = type;
		this.textIndex = -1;
        this.imageIndex = -1;
    }
}